<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


class MY_Controller extends CI_Controller
{

    public function __construct()
    {
        parent::__construct();

        $this->load->library('template', '', 'tpl');
		$this->tpl->template_dir = APPPATH . "../templates";
		$this->tpl->compile_dir = APPPATH . "../templates_c";

        $this->tpl->assign('site_url', $this->config->item('base_url'));
        $this->tpl->assign('js_url', $this->config->item('cdn_url').'/js/');
        $this->tpl->assign('css_url', $this->config->item('cdn_url').'/css/');
        
        if($this->user_model->is_login())
        {
            $this->tpl->assign('user_id', $this->user_model->get_id());
            $this->tpl->assign('user_name', $this->user_model->get_name());
            $this->tpl->assign('user_email', $this->user_model->get_email());
            $this->tpl->assign('is_login', true);
        }
    }
    
}

?>
